<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title"><span>工程信息</span><span onclick="go_to_bid_xiang()" class="colorlan" style="float: right;margin-right: 12px">查看工程概况</span></div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">工程名称</td><td id="bidname" class="tv colorlan"></td><td class="tt">工程状态</td><td id="bid_state" class="tv"></td></tr>
                <tr><td class="tt">工程编号</td><td id="bid_number" class="tv"></td><td class="tt">工程控制价(元)</td><td id="bid_kongfee" class="tv"></td></tr>
                <tr><td class="tt">招标代理公司</td><td id="bid_zhao_unit" class="tv"></td><td class="tt">承揽方式</td><td id="bid_lanshi_name" class="tv"></td></tr>
                <tr><td class="tt">开标时间</td><td id="bid_kaidt" class="tv"></td><td class="tt">工程发布平台</td><td id="bid_kailei_name" class="tv"></td></tr>
                <tr><td class="tt">业务归属</td><td id="bid_gui_unit_name" class="tv"></td><td class="tt">工程负责人</td><td id="bid_gofuer" class="tv"></td></tr>
                </tbody>
            </table>
        </div>


<!--        <div class="table-box tablenes">-->
<!--            <div class="title">前期费信息</div>-->
<!--            <table class="layui-table">-->
<!--                <tbody>-->
<!--                <tr><td class="tt">前期费收入(元)</td><td id="qian_shou_fee" class="tv"></td><td class="tt">前期费支出(元)</td><td id="qian_zhi_fee" class="tv"></td></tr>-->
<!--                <tr><td class="tt">前期费盈余(元)</td><td id="qian_run_fee" class="tv"></td><td class="tt">待收垫资利息(元)</td><td id="daishou_dianli_fee" class="tv"></td></tr>-->
<!--                </tbody>-->
<!--            </table>-->
<!--        </div>-->

        <div class="table-box tablenes">
            <div class="title">本次返还到账信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">关联保证金缴纳</td><td id="jiaoid_name" class="tv colorlan"></td><td class="tt">支付金额(元)</td><td id="jiaomoney" class="tv"></td></tr>
                <tr><td class="tt">款项摘要</td><td id="zhai" class="tv"></td><td class="tt">款项类型</td><td id="qishoulei_name" class="tv"></td></tr>
                <tr><td class="tt">到账金额(元)</td><td id="money" class="tv"></td><td class="tt">代理公司收取代理服务费(元)</td><td id="koudaifee" class="tv"></td></tr>
                <tr><td class="tt">到账方式</td><td id="incdaotype_name" class="tv"></td><td class="tt">付款方</td><td id="shouer" class="tv"></td></tr>
                <tr><td class="tt">到账账户</td><td id="accid_name" class="tv colorlan"></td><td class="tt">到账日期</td><td id="dt" class="tv"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>


        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>


        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;
    var pub_bidid;
    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_tou_fan_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var bidinfo = res.data.bidinfo;
                var jiaoidinfo = res.data.jiaoidinfo;
                var account = res.data.account;

                if(bidinfo){
                    pub_bidid = bidinfo.id
                    $("#bidname").text(bidinfo.name).click(function () {
                        openPage('../bid/show.php?id='+bidinfo.id);
                    });
                    $('#bid_state').text(bidinfo.state_name_wen);
                    $('#bid_number').text(bidinfo.number);
                    $('#bid_kongfee').text(parseFormatNum(bidinfo.kongfee));
                    $('#bid_zhao_unit').text(bidinfo.zhao_unit);
                    $('#bid_lanshi_name').text(bidinfo.lanshi_name);
                    $('#bid_kaidt').text(bidinfo.kaidt);
                    $('#bid_kailei_name').text(bidinfo.kailei_name);
                    $('#bid_gui_unit_name').text(bidinfo.gui_unit_name);
                    $('#bid_gofuer').text(bidinfo.gofuer);
                    $('#qian_shou_fee').text(bidinfo.qian_count.qian_shou_fee);
                    $('#qian_zhi_fee').text(bidinfo.qian_count.qian_zhi_fee);
                    $('#qian_run_fee').text(bidinfo.qian_count.qian_run_fee);
                    $('#daishou_dianli_fee').text(bidinfo.qian_count.daishou_dianli_fee);
                    if(parseFloat(bidinfo.qian_count.daishou_dianli_fee) > 0){
                        $('#daishou_dianli_fee').addClass('colorhong');
                    }else{
                        $('#daishou_dianli_fee').removeClass('colorhong');
                    }
                }
                if(jiaoidinfo) {
                    $("#jiaoid_name").text(jiaoidinfo.jiaosericnum).click(function () {
                        openPage('../tou_jiao/show.php?id=' + jiaoidinfo.id);
                    });
                    $('#jiaomoney').text(parseFormatNum(jiaoidinfo.money));
                }
                if(account){
                    $('#accid_name').text(account.name+'('+account.accnum+')').click(function () {
                        openPage('../account/show.php?id='+account.id);
                    });
                }

                $("#zhai").text(data.zhai);
                $("#qishoulei_name").text(data.qishoulei_name);
                $("#money").text(parseFormatNum(data.money));
                $("#koudaifee").text(parseFormatNum(data.koudaifee));
                $("#shouer").text(data.shouer);
                $("#incdaotype_name").text(data.incdaotype_name);
                $("#dt").text(data.dt);
                $("#explain").text(data.explain);
                // $(".pageshowtitle").text('投标保证金返还');




                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('tou_fan', param_id);
    });


    function go_to_bid_xiang(){
        if(pub_bidid){
            openPage('../bid/xiang.php?id='+pub_bidid);

        }else{
            facade.error("暂无工程信息");return false;
        }
    }
</script>
</body>
</html>




